<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head lang="zh-cn">
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title th:text="Beone-系统登录"></title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="Author" content="larry" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <link th:href="@{/static/larryms/images/icon.png}" rel="shortcut Icon"/>
    <!-- load css -->
    <link rel="stylesheet" type="text/css" th:href="@{/static/larryms/css/admin/login.css}" media="all"/>
    <style type="text/css">.layui-form-switch{margin-left: 108px;}</style>
</head>
<body>
<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<div class="main">
    <div class="login-box">
        <div class="login">
            <div class="login-form">
                <div class="logo">
                    <img th:src="@{/static/larryms/images/logo.png}" alt=""/>
                </div>
                <form class="user" id="larry_form" method="post" action="/loginValidator" >
                    <div class="layui-form-item">
                        <input name="username" autocomplete="off" type="text" class="layui-input larry-input"
                               lay-verify="username"  th:value="${username}" placeholder="用户名" />
                    </div>
                    <div class="pwd" id="password">
                        <input name="password" lay-verify="password" placeholder="密 码" autocomplete="off"
                               type="password" class="layui-input larry-input" th:value="${pwd}"/>
                    </div>
                    <div class="yzm" id="larry_code">
                        <input type="text" name="validateCode"    class="layui-input larry-input"
                               autocomplete="off" lay-verify="code" placeholder="验证码"/>
                          <img width="100%" th:src="@{/getCode}" id="captchaImg" />
                    </div>

                    <button class="layui-btn larry-btn" lay-filter="dologin" lay-submit="x">登录</button>
                </form>
            </div>
        </div>
        <div class="copyright">
            <p>
                为了更好的网站体验，建议您使用谷歌、火狐、IE9及以上版本、360极速模式等高版本的浏览器！<br/>
                谷歌浏览器（<a href="https://www.google.cn/chrome/" target="_blank">点击下载</a>）   |   火狐浏览器（<a href="http://www.firefox.com.cn/" target="_blank">点击下载</a>）   |  360安全浏览器（<a href="http://browser.360.cn/" target="_blank">点击下载</a>）<br/>
                版权所有：XXX <br/>
            </p>
        </div>
    </div>
</div>
<script th:src="@{/static/scripts/common/version.js(${T(java.lang.Math).random()})}" type="text/javascript"></script>
<script type="text/javascript" th:src="@{/static/larryms/layui/layui.js}"/>
<script th:inline="javascript">/*<![CDATA[*/
var bathPath = /*[[@{/}]]*/ "/";
layui.cache.page = 'indexlogin';
//layui.cache.imgPath = bathPath + 'static/larryms/images/';
layui.cache.captcha = bathPath + 'getCode';
layui.config({
    version:ui.version,
    base: bathPath + 'static/larryms/',  //实际使用时，建议改成绝对路径
    rightMenu: "none",
    loginelem:true
}).extend({
    larry:'js/base'
}).use(['larry'], function () {
    var logout = [[${param.logout}]], error = [[${param.error}]],
            message = [[${session.SPRING_SECURITY_LAST_EXCEPTION?.message}]];
    if(logout){
        //layuiUtils.toastMsg({content:'退出系统成功!',icon:'success'});
        layer.msg('退出系统成功!', { icon: 1,  time: 1000});
    }

    if(error && message){ //登录异常
        if("坏的凭证" == message){
            message = '密码错误!';
        }
        layer.msg(message, { icon: 5,  time: 1000});
    }
});
/*]]>*/</script>
<!-- 底部结束 -->
</body>
</html>